package com.bdf.ipharma.components;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;

import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

import org.apache.log4j.Logger;
import javax.swing.SwingConstants;

public class CustomHeaderTable extends JLabel implements TableCellRenderer {
	static final Logger logger = Logger.getLogger(CustomHeaderTable.class);
	/**
	 * @wbp.nonvisual location=102,151
	 */
	
	

	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
		try {
			 setHorizontalAlignment(SwingConstants.CENTER);
			 setBackground(Color.white);
			 setText(value.toString());
			 setToolTipText((String) value);
		} catch (NullPointerException ne) {
			logger.fatal("RotatedTableCellRenderer : " + ne.getMessage());
			this.setText("Nullvalue");
		}
		return this;
	}


}
